<h1 class="title">Projects Management</h1>
<div id="authMessage" style="color: red;"><?php echo $this->Session->flash(); ?></div>
<?php echo $this->Form->create('User',array('action'=>'admin_login')); ?>
    <fieldset>
    	<div class="input">
            <?php echo $this->Form->input('Username',array('type'=>'text','placeholder'=>'Username','maxlength'=>100,'label'=>false));  ?>
        </div>    
    	<div class="input">
            <?php echo $this->Form->input('Password',array('type'=>'password','placeholder'=>'Password','label'=>false,)) ?>
    	</div>
    	<div class="remember">
    	</div>
    		<?php echo $this->Form->end(array('label'=>'Login','id'=>'btnSubmit')); ?>
        
    </fieldset>
<script>
    $("#UserLoginForm").submit(function(){
        var uname = $('#UserUsername').val();
        var pwd   = $("#UserPassword").val();
        if(uname == "" || pwd == ""){
            $("#authMessage").html("Username OR Password is empty ");
            return false;
        }
        else{
            return true;
        }
    });
</script>	